package com.xiaozhaovip.demo.service;

import com.xiaozhaovip.demo.intf.entity.YueQiLaiActivityJoiner;
import com.xiaozhaovip.demo.intf.mapper.YueQiLaiActivityJoinerMapper;
import com.xiaozhaovip.demo.intf.service.YueQiLaiActivityJoinerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 活动参与人 业务层实现
 *
 * @author Cauli
 */
@Service
public class YueQiLaiActivityJoinerServiceImpl implements YueQiLaiActivityJoinerService {
    @Resource
    YueQiLaiActivityJoinerMapper yueQiLaiActivityJoinerMapper;

    @Override
    public YueQiLaiActivityJoiner loadByUserIdAndActivityId(int userId, int activityId) {
        return yueQiLaiActivityJoinerMapper.loadByUserIdAndActivityId(userId, activityId);
    }

    @Override
    public int insert(YueQiLaiActivityJoiner joiner) {
        return yueQiLaiActivityJoinerMapper.insert(joiner);
    }

    @Override
    public int updateJoinerStatusById(int joinerId, int activityId, int status) {
        return yueQiLaiActivityJoinerMapper.updateJoinerStatusById(joinerId, activityId, status);
    }
}
